
package it.polimi.sartori_daniello_picca.meteocal.entity;

import java.io.Serializable;
import java.sql.Time;
import java.sql.Date;
import javax.persistence.Embedded;

/**
 *
 * @author Ale
 */
public class WeatherForecast implements Serializable {
    private static final long serialVersionUID = 1L;
    
    private Long id;
    private Date date;
    private Time time;
    
     @Embedded
    public WeatherCondition weatherCondition;
    
    public Long getId() {
        return id;
    } 
    public void setId(Long id) {
        this.id = id;
    }
    public Date getDate() {
        return date;
    }
    public void setDate(Date date) {
        this.date= date;
    }
    public Time getTime() {
        return time;
    }
    public void setTime (Time time) {
        this.time= time;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode():0);
        return hash;
    }
     @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof WeatherForecast)) {
            return false;
        }
        WeatherForecast other = (WeatherForecast) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }
    
      @Override
    public String toString() {
        return "it.polimi.sartori_daniello_picca.meteocal.entity.WeatherForecast[ id=" + id + " ]";
    }
    
    public WeatherCondition getWeatherCondition() {
        return weatherCondition;
    }
    public void setWeatherCondition (WeatherCondition weatherCondition) {
        this.weatherCondition = weatherCondition;
    }
}
